<?
//define('IN_INDEX', TRUE);

session_start();

include('./../config/db_settings.php');
include('./../pms/pms_inc.php');

$pid = $_REQUEST['id'];
?>
<html>
<head>
<title>Thumbs Down Details</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css"
	href="../templates/<? echo $settings['template'] ?>/style_lp.css"
	media="all" />
<script src="../js/google.js" type="text/javascript"></script>
</head>
<script>

</script>
<body>
<?
	if(empty($pid)){
		echo "No information found.";
		exit;
	}
?>
<table class="normaltab" border="0" cellpadding="5" cellspacing="1"
	width="200">
	<tr>
		<th width="100px" valign="top">Username</th>
		<th width="100px" valign="top">Thumbs Down</th>
	</tr>
	<?
	$i = 1;
	$c = "a";
	
	$sql = mysql_query ("SELECT down, ts, u.user_name, u.user_real_name FROM ".$db_settings['thumbsdetails_table']." t join ".$db_settings['userdata_table']." u on t.uid = u.user_id WHERE t.down=1 and t.pid='$pid'");
	
	while($thumbs = mysql_fetch_array($sql))
	{
		$username = htmlspecialchars(stripslashes($thumbs['user_name']));
		$nickname = "(".htmlspecialchars(stripslashes($thumbs['user_real_name'])).")";
		$user = $username.$nickname;
		$ts = $thumbs['ts'];

		if($i==1){$c = "a";}
		else {$c = "b";}
		$i= $i * -1;
		?>
	<tr>
		<td valign="top" class="<? echo $c; ?>"><span class="small"><? echo $user ?></span></td>
		<td valign="top" class="<? echo $c; ?>"><span class="small"><? echo $ts ?></span></td>
	</tr>
	<?
	}
	?>
</table>
</body>
</html>
